/*
 * my_resampler.h
 *
 *  Created on: 19 août 2011
 *      Author: cedric
 */

#ifndef RESAMPLER_H_
#define RESAMPLER_H_

#define sample_t double

#include <stdint.h>
#include <stdbool.h>
#include "common.h"

//Object Handle
typedef struct my_resampler * MyResampler;

//Constructor and destructor
MyResampler my_resampler_new(uint32_t ntaps, uint32_t input_rate,
		uint32_t output_rate, buffer_size_t output_buffer_size,
		my_resampler_window_function func,
		void(*callback)(sample_t* s, buffer_size_t size));
void my_resampler_destroy(MyResampler);

//Public methods
void my_resampler_process_sample(MyResampler handle, sample_t* sample,
		buffer_size_t size);
void my_resampler_set_clipping(MyResampler handle, bool clip);

#endif /* RESAMPLER_H_ */
